package zjw.controller;

import java.util.List;

import javax.annotation.Resource;

import zjw.dao.TableMapper;

public class GeneTableName {
	@Resource
	private TableMapper tableMapper;
	public void geneTableName() {
		List<String> list = tableMapper.gettable();
		String[] str = null;
		String tableName = null;
		String modelName = null;
		String aaa[]=null;
		int index=0;
		String packagename = null;
		for (int i = 0; i < list.size(); i++) {
			tableName = list.get(i);
			System.out.print(tableName+",");
		}
		System.out.println("---------------------------------------------------");
		for (int i = 0; i < list.size(); i++) {
			tableName = list.get(i);
			str = tableName.split("_");		
			if (str.length ==2 ) {
				packagename = str[0];
				modelName = packagename + captureName(str[1]);
			}
			System.out.print(modelName+",");
		}
	}
	public static String captureName(String name) {
		name = name.substring(0, 1).toUpperCase() + name.substring(1);
		return name;

	}
}
